import request from "@/util/request";

// 新增商品
export const addProduction = (data) =>{
    return request({
        url: '/applet/productInfo',
        method: 'post',
        data
    })
}

// 修改商品
export const updateProduction = (data) =>{
    return request({
        url: '/applet/productInfo',
        method: 'put',
        data
    })
}

//删除商品
export const deleteProduction = (id) =>{
    return request({
        url: '/applet/productInfo/'+id,
        method: 'DELETE',
    })
}

//获取产品数据列表
export const getProductionList = (query) =>{
    return request({
        url: '/applet/productInfo/list',
        method: 'get',
        params:query
    })
}
//获取产品数据详情
export const getProductInfo = (id) =>{
    return request({
        url: '/applet/productInfo/'+id,
        method: 'get',
    })
}